<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../static/css/write_main.css">
    <link rel="stylesheet" type="text/css" href="../../static/css/write.css">
    <script src="../../static/js/jquery-1.12.4.min.js"></script>
    <script src="../../static/js/markdown_main.js"></script>
    <script type="text/javascript" src="../../static/js/write.js"></script>
</head>
<body>
<div class="write_art">
    <div class="one">
        <input type="text" id="art_title" placeholder="{{article|show_placeholder}}" onkeyup="show_title_num()">
        <p style="width: 50px"></p>
        <p>分类：</p>
        <select class='art_classify'>
            {%for i in classify%}
            <option value="{{i.id}}">{{i.name}}</option>
            {%endfor%}
        </select>
    </div>
    <div class="two" type="{{article|new_or_change}}">
        <a href="{{ url_for('user_blu.user') }}" class="ava_b"><img src="{{user.avatar_url}}"></a>
        <a href="{{ url_for('index_blu.index') }}" class="home_b"><img src="../../static/img/home.png"></a>
        <input type="button" onclick="save_art()" value="发布文章">
    </div>
</div>
<div id="area">
    <table>
        <tr>
            <td><textarea name="" id="md-area" onkeyup=mdSwitch()>{%if article%}{{article.content}}{%else%}欢迎使用Markdown编辑器{%endif%}</textarea>
            </td>
            <td>
                <div id="show-area" class="clearfix">
                    {% if article %}
                    {{ article.content }}
                    {% else %}
                    欢迎使用Markdown编辑器
                    {% endif %}
                </div>
            </td>
        </tr>
    </table>
</div>
</body>

</html>